// example_text_file_writer.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <functional>
#include <math.h>
#include <time.h>
#include <Inklude/ikCTimer.h>

using namespace Inklude;

class TestA
{
public:
    int abc(int a, int b)
    {
        return a + b;
    }
protected:
private:
};

int _tmain(int argc, _TCHAR* argv[])
{   
    ikCTimer timer;

    timer.Start();
    srand(time(0));
    TestA ta;

    timer.Stop();
    timer.Start();
    int a = 0;
    int b = 5;
    for (int i=0; i<100; i++)
    {
        //int a = rand();
        //int b = rand();
        //TestA* ptest = new TestA();
        auto func = std::bind(&TestA::abc,&ta,a,b);
        func(a,b);
        //delete ptest;
    }
    printf("%f\n", timer.ElapsedMilliseconds());

    timer.Stop();
    timer.Start();
    for (int i=0; i<100; i++)
    {
        //int a = rand();
        //int b = rand();
        //TestA* ptest = new TestA();
        ta.abc(a, b);
        //delete ptest;
    }
    printf("%f\n", timer.ElapsedMilliseconds());

    
	return 0;
}

